﻿using AiBLSmartEdu.Module.AISlimmingAssistant.API.Services;
using Domain.Entities.SlimmingAssistants;
using FrameworkCore.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

#nullable disable

namespace AiBLSmartEdu.Module.AISlimmingAssistant.API.DTOs
{
    [Map(typeof(SlimmingAssistant))]
    public class SlimmingAssistantOutputModel
    {
        /// <summary>
        /// 唯一标识
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 性别 女：0；男：1
        /// </summary>
        public Gender? Gender { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        public int? Age { get; set; }

        /// <summary>
        /// 身高（CM）
        /// </summary>
        public double? Height { get; set; }

        /// <summary>
        /// 体重（千克）
        /// </summary>
        public double? Weight { get; set; }

        /// <summary>
        /// 体脂结果
        /// </summary>
        public BodyFatResult BodyFatResult 
        {
            get
            {
                return BodyFatAnalysis.Calculate(Gender.Value, Age.Value, Weight.Value, Height.Value);
            } 
        }

        /// <summary>
        /// 推荐/建议
        /// </summary>
        public string Referrals { get; set; }
    }
}
